package parsing;

import java.util.HashMap;
import java.util.Map;

public class Element {
	private int id;
    private String name = null;
    private String type = null;
    private Element parent = null;
    private Map <String, String> attributes = new HashMap<String, String>();
    
    public Element() {}
    
    public Element(String name) {
      this.name = name;	
    }
    
    
    public int getId() {
        return id;	
    }   
    public void setId(int id) {
        this.id = id;	
    }
    
    public String getName() {
      return name;	
    }
    public void setName(String name) {
      this.name = name;	
    }
    
    public String getType() {
      return type;	
    }
      public void setType(String type) {
      this.type = type;	
    }
    
    public Element getParent() {
      return parent;	
    }
    public void setParent(Element parent) {
      this.parent = parent;	
    }
    
    public String getAttributeValue(String key) {
      return attributes.get(key);
    }
    
    public Map<String, String> getAttribute() {
      return attributes;	
    }
    public void setAttribute(String key, String value) {
      this.attributes.put(key, value);	
    }
}
